1 <?php
2  session_start();
3  
if(isset($_SESSION['user']))
4  {
5
6  }
7  
else{
8   echo
"<script>location.href='login.html'</script>";
9  }
10 ?>
11 <html>
12     <head>
13         <title>Customer </title>
14         <style>
15             body {
16   margin:
0;
17   font-family: Arial, Helvetica, sans-serif;
18   background: #
484848;
19 }
20 .topnav {
21   overflow: hidden;
22   background-color: #8d2663;
23   height: 70px;
24   border: 3px solid #b40a70;
25 }
26
27 .topnav a {
28   
float: left;
29   color: #f2f2f2;
30   text-align: center;
31   padding: 14px 16px;
32   text-decoration: none;
33   font-size: 35px;
34   font-weight: bold;
35 }
36
37 .topnav-right {
38   
float: right;
39 }
40 table {
41     font-family: arial, sans-serif;
42     border-collapse: collapse;
43     outline:#b40a70 solid 5px;
44     width:
100%;
45     margin:5px ;
46     background: #FAFAFA;
47 }
48
49 td, th {
50     border: 1px solid #dddddd;
51     text-align: left;
52     padding: 8px;
53 }
54 th{
55     background-color:#8d2663 ;
56 }
57
58
59 .custombutton{
60   margin:25px;
61   
62 }input[type=text] {
63     width:
15%;
64     padding: 12px 20px;
65     margin:8px ;
66     border: 2px solid red;
67     background:transparent;
68     color:#
000000;
69 }
70 input[type=number] {
71     width:
15%;
72     padding: 12px 20px;
73     margin:8px ;
74     border: 2px solid red;
75     background:transparent;
76     color:#
000000;
77 }
78
79 </style>
80 </head>
81 <body>
82 <div
class="topnav">
83             <a
class="active" href="home.html"><img src="ic_add_pet.png"></a>
84             <a href=
"phone.php">Customer numbers</a>
85             <div
class="topnav-right">
86               <a href=
"logout.php">logout</a>
87             </div>
88           </div>
89           <div
class="custombutton">
90
91 <form>
92 <button style=
" height: 50px;width: 150px;cursor:pointer;border-radius:15px;
93 border: 3px solid #b40a70;background-color: #8d2663;color:#f2f2f2;font-size:15px;"
formaction="customer.php">Back</button>
94 <button style=
" height: 50px;width: 150px;cursor:pointer;border-radius:15px;
95 border: 3px solid #b40a70;background-color: #8d2663;color:#f2f2f2;font-size:15px;"
formaction="phoneadd.php">Add new number</button>
96 </form>
97 </div>
98     <?php
99    
100 $con = mysqli_connect(
"localhost","root","","Petshop_management");
101 if
(!$con)
102 {
103 die(
"could not connect".mysql_error());
104 }
105 $
var=mysqli_query($con,"select * from phone ");
106 echo
"<table>";
107 echo
"<tr>
108 <th>cs_ID</th>
109 <th>cs_phone</th>
110 </tr>"
;
111 if
(mysqli_num_rows($var)>0){
112     
while($arr=mysqli_fetch_row($var))
113     { echo
"<tr>
114     <td>$arr[
0]</td>
115     <td>$arr[
1]</td>
116     </tr>"
;}
117     echo
"</table>";
118     mysqli_free_result($
var);
119 }
120
121 mysqli_close($con);
122     
123     
124 ?>
125 <form action=
"deletephone.php" method="post">
126 <input type=
"text" name="t1" placeholder="Enter the id to delete" required>
127 <input type=
"number" name="t2" placeholder="Enter the number" required>
128     <input style=
"width:75px;height:44px;cursor:pointer;border-radius:15px;
129 border: 3px solid #b40a70;background-color: #8d2663;color:#f2f2f2;font-size:15px;"
type="submit" value="Delete">
130
131 </form>
132
133 </body>
134 </html>


Gõ tìm kiếm nhanh...